package com.google.code.fluentjoiner;

import com.google.common.base.Supplier;

public class Applier<T>
{
    private final Supplier<T> supplier;
    private final Consumer<? super T> consumer;

    public Applier(final Supplier<T> supplier, final Consumer<? super T> consumer)
    {
        this.supplier = supplier;
        this.consumer = consumer;
    }

    public void apply()
    {
        consumer.consume(supplier.get());
    }
}
